IntegerRange

interface IntegerRange

Range of integers.

Functions

Link copied to clipboard
open fun clamp(value: Int): Int
Clamps a value to this range.
Link copied to clipboard
open fun contains(value: Int): Boolean
Tells whether this range may contain some value.
Link copied to clipboard
abstract fun getLower(): Int
Gets lower bound.
Link copied to clipboard
abstract fun getUpper(): Int
Gets upper bound.
Link copied to clipboard
open fun of(lower: Int, upper: Int): IntegerRange
Creates an immutable IntegerRange.
Link copied to clipboard
open fun scaleFrom(value: Int, @NonNull src: IntegerRange): Int
Scales a value from a given range to this range.